<?php
use LSYS\Area;
use LSYS\APIServer\ResultFail;
use LSYS\APIServer\ResultSucc;
use LSYS\APIServer\Param;
include_once __DIR__."/Bootstarp.php";
$area=Area::instance();
//通过地址代码解析地址

$param=Param::factory($_GET);
try{
	$code=$param->get("code",NULL,Param::TYPE_STRING_TRIM,TRUE);
}catch(\LSYS\APIServer\ParamException $e){
	out_json(ResultFail::factory($e->getMESSAGE()));
}
list($status,$detail)=$area->parse($code);
if (!$status)out_json(ResultFail::factory('Parse Fail'));
else out_json(ResultSucc::factory($detail));
